package com.app.yc.ifapp.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 作者：TanTun
 * 时间：2017/3/19
 * 邮箱：32965926@qq.com
 * 描述：
 */

public class Field implements Parcelable {
    int tag;
    int len;
    String value;

    public int getTag() {
        return tag;
    }

    public void setTag(int tag) {
        this.tag = tag;
    }

    public int getLen() {
        return len;
    }

    public void setLen(int len) {
        this.len = len;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.tag);
        dest.writeInt(this.len);
        dest.writeString(this.value);
    }

    public Field() {
    }

    protected Field(Parcel in) {
        this.tag = in.readInt();
        this.len = in.readInt();
        this.value = in.readString();
    }

    public static final Parcelable.Creator<Field> CREATOR = new Parcelable.Creator<Field>() {
        @Override
        public Field createFromParcel(Parcel source) {
            return new Field(source);
        }

        @Override
        public Field[] newArray(int size) {
            return new Field[size];
        }
    };
}
